{% extends "simple.html" %}

{% block body %}

<div id=results>&nbsp;</div>

<script src="http://stevesouders.com/bin/resource.cgi?headers=1&t={{ epoch }}"
        type="text/javascript"></script>
<script>
function doTest() {
  var aeheader = aHeaders['HTTP_ACCEPT_ENCODING'].toLowerCase();
  document.getElementById('aeheader').innerHTML = "Accept-Encoding: " + aeheader;
  bCompresses = (-1 != aeheader.indexOf('gzip') ||
                 -1 != aeheader.indexOf('deflate') ? 1 : 0 );
  if (bCompresses) {
    document.getElementById('results').innerHTML =
        "Your browser <i>does</i> support compression.";
  } else {
    document.getElementById('results').innerHTML =
        "Your browser does <i>not</i> support compression.";
  }
  parent.saveResult('gzip', bCompresses);
}

window.onload = doTest;
</script>

<p>
This test checks that the browser is sending an <code>Accept-Encoding</code> header that contains "gzip" or "deflate".

<p>
Your browser's <code>Accept-Encoding</code> header is:
<pre id=aeheader style="margin-left: 40px">
</pre>


{% endblock %}
